#include "stdafx.h"
#include <LitPrerequisites.h>
#include <LitString.h>

namespace Lit
{
	String LIT_API trExceptionType( ExceptionType t ){
		switch( t )
		{
		case EXC_UNKNOWN: return "Unknown";
		case EXC_RUNTIME_ERROR: return "Runtime";
		case EXC_LOGIC_ERROR: return "Logic";
		case EXC_INIT_ERROR: return "Initialisation";
		case EXC_COMPONENT_ERROR: return "Component";
		case EXC_RENDER_ERROR: return "Rendering";
		case EXC_SHUTDOWN_ERROR: return "Shutdown";
		case EXC_CAST_ERROR: return "Cast";
		case EXC_ITEM_DUPLICATE: return "Item Duplicate";
		case EXC_ITEM_MISSING: return "Item Missing";
		case EXC_FILE_MISSING: return "File Missing";
		case EXC_FILE_DUPLICATE: return "File Duplicate";
		case EXC_CONSOLE_ERROR: return "Console";
		case EXC_IMPLEMENTATION_MISSING: return "Implementation Missing";
		case EXC_IO_ERROR: return "IO";
		case EXC_SCRIPT_ERROR: return "Script";
		case EXC_SCRIPT_PREPROCESSOR_ERROR: return "Script Preprocessor";
		};
		return "Unknown";
	}
	String LIT_API trComponentType( CoreComponentType t ){
		switch( t )
		{
		case COM_NONE: return "None";
		case COM_EVENTMANAGER: return "EventManager";
		case COM_SCENEMANAGER: return "SceneManager";
		case COM_PHYSICSMANAGER: return "PhysicsManager";
		case COM_CACHEMANAGER: return "CacheManager";
		};
		return "Unknown";
	}
	String LIT_API trCacheLocation( CacheLocation t ){
		switch( t )
		{
		case CL_ROOT: return "Root";
		case CL_TMP: return "Temporary";
		case CL_PRE_RENDER: return "PreRender";
		};
		return "Unknown";
	}
#ifdef LIT_OGRE_SUPPORT
	String LIT_API trShapeType( Physics::ShapeType t ){
		switch( t )
		{
		case Physics::ST_BOX: return "Box";
		case Physics::ST_PLANE: return "Plane";
		case Physics::ST_SPHERE: return "Sphere";
		case Physics::ST_NULL: return "Null";
		};

		return "Unknown";
	}
	String LIT_API trPlatformOptimisation( Physics::PlatformOptimisation t ){
		switch( t )
		{
		case Physics::PO_COMPLEX: return "Complex";
		case Physics::PO_NONE: return "None";
		case Physics::PO_SIMPLE: return "Simple";
		};
		return "Unknown";
	}
	String LIT_API trSolverModel( Physics::SolverModel t ){
		switch( t )
		{
		case Physics::SM_EXACT: return "Exact";
		case Physics::SM_ITERATIVE_ADVANCED: return "Iterative Advanced";
		case Physics::SM_ITERATIVE_PRECISE: return "Iterative Precise";
		case Physics::SM_ITERATIVE_SIMPLE: return "Iterative Simple";
		};
		return "Unknown";
	}

	String LIT_API trMovableType( MovableType t )
	{
		switch( t )
		{
		case MT_UNDEFINED: return "Undefined";
		case MT_ENTITY: return "Entity";
		case MT_LIGHT: return "Light";
		case MT_SOUND: return "Sound";
		case MT_PLANE: return "Plane";
		};
		return "Undefined";
	}
	String LIT_API trLightType( LightType t )
	{
		switch( t )
		{
		case LT_POINT: return "Point";
		case LT_DIRECTIONAL: return "Directional";
		case LT_SPOTLIGHT: return "Spotlight";
		};
		return "Unknown";
	}
#endif
	String LIT_API trAxisDirection( AxisDirection t )
	{
		switch( t )
		{
		case AXIS_X: return "X";
		case AXIS_Y: return "Y";
		case AXIS_Z: return "Z";
		case AXIS_CUSTOM: return "Custom";
		case AXIS_NONE: return "None";
		};
		return "None";
	}
	String LIT_API trPlaneAxis( PlaneAxis t )
	{
		switch( t )
		{
		case PLANE_XZ: return "[XZ]";
		case PLANE_YZ: return "[YZ]";
		case PLANE_XY: return "[XY]";
		case PLANE_NONE: return "None";
		};
		return "None";
	}

};